package com.turing.post.organization.util;

import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author zxp
 * @Mar 15, 2013
 */

@SuppressWarnings("serial")
@Entity
@Table(name = "CreditAccDetail")
public class CreditAccDetail implements java.io.Serializable {

	private BigInteger creditAccDetailId;// 主键 Int Not Null
	private String issueBranchNo;// 发卡机构号 varchar(20) Not Null 参考IssueBranch
	private Date tranDate;// 账务日期 Date Not Null
	private Date tranTime;// 记账时间 Date Not Null

	/**
	 * 10发放激活额度（+-）
	 */
	public static final String Give_Ac_Bal = "10";
	/**
	 * 20 发放授信额度（+-）
	 */
	public static final String Give_Cr_Bal = "20";
	/**
	 * 30收到授信额度（+-）
	 */
	public static final String get_Cr_Bal = "30";
	/**
	 * 40 使用激活额度（+-）
	 */
	public static final String use_Ac_Bal = "40";
	/**
	 * 50现金赎回
	 */
	public static final String Cash_Rep_Bal = "50";

	private String tranType;// 记账类型 Char（2） Not Null

	private BigInteger orderId;// 业务单号 Int Null 相关业务单号

	public static final String orderType_SALE = "0";// 销售单
	public static final String orderType_DEPOSIT = "1";// 1–充值单

	private String orderType;// 业务类型 Char（1） Null
	private BigInteger amount;// 发生额 Number Not Null 可正可负，单位分
	private BigInteger activateBalance;// 激活额度 Number Not Null
	private BigInteger creditBalance;// 授信额度 Number Not Null
	private BigInteger operId;// (FK) 操作员 Int Not Null
	private String remark;// 备注 Varchar（255） Null

	public CreditAccDetail() {

	}

	@Id
	@Column(name = "creditAccDetailId")
	public BigInteger getCreditAccDetailId() {
		return creditAccDetailId;
	}

	public void setCreditAccDetailId(BigInteger creditAccDetailId) {
		this.creditAccDetailId = creditAccDetailId;
	}

	@Column(name = "issueBranchNo")
	public String getIssueBranchNo() {
		return issueBranchNo;
	}

	public void setIssueBranchNo(String issueBranchNo) {
		this.issueBranchNo = issueBranchNo;
	}

	@Column(name = "tranDate")
	public Date getTranDate() {
		return tranDate;
	}

	public void setTranDate(Date tranDate) {
		this.tranDate = tranDate;
	}

	@Column(name = "tranTime")
	public Date getTranTime() {
		return tranTime;
	}

	public void setTranTime(Date tranTime) {
		this.tranTime = tranTime;
	}

	@Column(name = "tranType")
	public String getTranType() {
		return tranType;
	}

	public void setTranType(String tranType) {
		this.tranType = tranType;
	}

	@Column(name = "orderId")
	public BigInteger getOrderId() {
		return orderId;
	}

	public void setOrderId(BigInteger orderId) {
		this.orderId = orderId;
	}

	@Column(name = "orderType")
	public String getOrderType() {
		return orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	@Column(name = "amount")
	public BigInteger getAmount() {
		return amount;
	}

	public void setAmount(BigInteger amount) {
		this.amount = amount;
	}

	@Column(name = "activateBalance")
	public BigInteger getActivateBalance() {
		return activateBalance;
	}

	public void setActivateBalance(BigInteger activateBalance) {
		this.activateBalance = activateBalance;
	}

	@Column(name = "creditBalance")
	public BigInteger getCreditBalance() {
		return creditBalance;
	}

	public void setCreditBalance(BigInteger creditBalance) {
		this.creditBalance = creditBalance;
	}

	@Column(name = "operId")
	public BigInteger getOperId() {
		return operId;
	}

	public void setOperId(BigInteger operId) {
		this.operId = operId;
	}

	@Column(name = "remark")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
}